#include<bits/stdc++.h>
using namespace std;
#define inf 0x3f3f3f3f
#define mod 998244353
#define N 100010
// #define int long long
#define szi sizeof(int)
#define il inline
int n,m,a[N],t[N],c[N],sum,tmp,ans;
signed main(){
    freopen("duel.in","r",stdin);
    freopen("duel.out","w",stdout);
    scanf("%d",&n),ans=m=n;
    for(int i=1;i<=n;++i) scanf("%d",&a[i]),t[i]=a[i];
    sort(t+1,t+n+1),m=unique(t+1,t+m+1)-t-1;
    for(int i=1;i<=n;++i)
        a[i]=lower_bound(t+1,t+m+1,a[i])-t,++c[a[i]];
    sum=c[1];
    for(int i=2;i<=m;++i)
        tmp=min(c[i],sum),ans-=tmp,sum-=tmp,sum+=c[i];
    printf("%d\n",ans);
    return 0;
}
